﻿/*
 * Description: process monitor dll entry.
 */
#include "pch.h"
#include <iostream>
#include <cstdarg>
#include <thread>
#include <Windows.h>
#include "include/detours.h"
#include "aspect.h"

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
    if (ul_reason_for_call == DLL_PROCESS_ATTACH) {
        PERF::AppendAspect();
    } else if (ul_reason_for_call == DLL_PROCESS_DETACH) {
        PERF::RemoveAspect();
    }
    return TRUE;
}
